from selenium.webdriver.common.by import By

from page import login
from page.base_page import BasePage
from page.login import Login
from page.register import Register


class Main(BasePage):
    _base_url = "https://www.jd.com/"

    # 进入登录页面
    def goto_login(self):
        self.find(By.CSS_SELECTOR, '.link-login').click()
        return Login(self._driver)


    def goto_register(self):

        self.find(By.CSS_SELECTOR, '.link-regist').click()
        return Register(self._driver)
